home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: Aug 15 1996
- //
- // Description:
- // This script initializes the Help line. Initialization involves
- // determining the initial Help line preferences, creating the UI and
- // setting the initial visibility.
- //
- {
- // Declare referenced or returned globals.
- //
- global string $gHelpLineForm;
- global string $gMainProgressBar;
-
- // Create a layout appropriate for the Help line.
- //
- string $helpLine = `frameLayout
- -parent $gHelpLineForm
- -borderVisible true
- -borderStyle "in"
- -labelVisible false
- -collapse false
- -collapsable false`;
-
- string $innerForm = `formLayout -parent $helpLine`;
-
- // Now actually create the Help line.
- //
- string $helpControl = `helpLine
- -annotation "HelpLine: Displays short help tips for tools and selections"`;
-
- // Now create the embedded progressbar
- //
- $gMainProgressBar = `progressBar -isMainProgressBar true
- -visible false
- -width 1
- -height 10
- mainProgressBar`;
-
- formLayout -edit
- -af $helpControl "top" 0
- -ac $helpControl "left" 0 $gMainProgressBar
- -af $helpControl "bottom" 0
- -af $helpControl "right" 0
-
- -af $gMainProgressBar "left" 2
- -af $gMainProgressBar "top" 4
- -af $gMainProgressBar "bottom" 3
- -an $gMainProgressBar "right"
-
- $innerForm;
-
- // Attach Help line to parent.
- //
- formLayout -edit
- -attachForm $helpLine "top" 0
- -attachForm $helpLine "left" 1
- -attachForm $helpLine "bottom" 0
- -attachForm $helpLine "right" 0
- $gHelpLineForm;
-
- setUIComponentStateCallback(
- "Help Line", "helpLineVisibilityStateChange");
-
- // Set the Help line's initial visibility.
- //
- setHelpLineVisible(`optionVar -query helpLineVisible`);
- }
-
- global proc int helpLineVisibilityStateChange(
- int $newState,
- string $layout)
- //
- // Description:
- // This procedure is called whenever the visibility state of the
- // Help Line is changed.
- //
- // Arguments:
- // newState - The new visibile state of the Help Line.
- //
- // layout - The parent layout for the Help Line.
- //
- // Returns:
- // true - If the change of state is to be allowed.
- //
- // false - If the state change is rejected.
- //
- {
- int $result = true;
-
- // Defer these commands because this proc is called when the visibility
- // state is about to change. This proc must return true to accept
- // the state change. After this proc returns then restore the
- // panel focus and update the pref menu.
- //
- evalDeferred("restoreLastPanelWithFocus(); updatePrefsMenu();");
-
- return $result;
- }
-